<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <f:facet name="first">
            <meta http-equiv="X-UA-Compatible" content="IE=edge" />
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0, 
                  maximum-scale=1.0, user-scalable=0" />
            <meta name="apple-mobile-web-app-capable" content="yes" />
        </f:facet>
        <title>testtesttest</title>
    </h:head>
    <h:body>
        
        <h2>员工注册</h2>
        <p:separator />
        <br/>
        <h:form id="form">  
        <div style="padding: 0px 0 0 0px; font-size: 22px; font-weight: bold">  
           <!-- 输出标签,就是Label -->
            <h:outputLabel>User Name:</h:outputLabel>
            <h:inputText id="username" value="#{user.name}" required="true" requiredMessage="User Name is required"></h:inputText>
            <br></br>
            <h:outputLabel>User age:</h:outputLabel>
            <h:inputText id="userage" value="#{user.age}"></h:inputText>
            <br></br>
            <h:outputLabel>User comtry:</h:outputLabel>
            <h:inputText id="usercontry" value="#{user.contry}"></h:inputText>
            <br></br>
            <h:outputLabel>是否立即注册:</h:outputLabel>
            <p:inputSwitch value="#{user.status}" />
                      
            <br></br>
            <h:commandButton id="submit-button" value="Submit" action="response.xhtml" actionListener="#{loginService.addUser(user)}"/>
        </div>  
    </h:form> 
    </h:body>
</html>